Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: apply even/odd classes correctly when rows are grouped #111

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

spike-rabbit
Copy link
Member

@spike-rabbit spike-rabbit commented Nov 4, 2024

What kind of change does this PR introduce? (check one with "x")

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Other... Please describe:

What is the current behavior? (You can also link to an open issue here)

When using groups, all rows are marked as odd

What is the new behavior?

When using groups, all rows are marked as event / odd toggling in their group. So, the first element in a group will always be even.

Does this PR introduce a breaking change? (check one with "x")

  • Yes
  • No (except for the correct typing, but since this is not released, we don't need a notice here.

If this PR contains a breaking change, please describe the impact and migration path for existing applications:

Previously CellContext.rowIndex was a string if the row was inside a group.
Now CellContext.rowIndex is always a number.
Either containing the index of the row or if the row is inside a group, the index of the group.
To access the index value of a row within a group, use the newCellContext.rowInGroupIndex.

Other information:

@spike-rabbit spike-rabbit self-assigned this Nov 4, 2024
@spike-rabbit spike-rabbit force-pushed the refactor/improve-rowindex-types branch from e62e202 to c15be94 Compare November 4, 2024 16:08
@spike-rabbit spike-rabbit requested a review from timowolf November 4, 2024 16:09
Copy link
Member

@timowolf timowolf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we can reevaluate the string type for the group index row index combination

@spike-rabbit spike-rabbit force-pushed the refactor/improve-rowindex-types branch 6 times, most recently from 10faee4 to 5138715 Compare February 26, 2025 14:58
BREAKING CHANGE: Previously `CellContext.rowIndex` was a `string` if the row was inside a group.
Now `CellContext.rowIndex` is always a number.
Either containing the index of the row or if the row is inside a group, the index of the group.
To access the index value of a row within a group, use the new`CellContext.rowInGroupIndex`.
@spike-rabbit spike-rabbit force-pushed the refactor/improve-rowindex-types branch from 5138715 to ac8f20e Compare February 26, 2025 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants